package vue.consultation;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.FlowLayout;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ConsultMenu extends JPanel {

	private JPanel panelBtnBar;
	private JMenuBar menuBar;
	private JMenu mnNewMenu;
	private JMenuItem mntmNewMenuItem;
	private JMenuItem mntmSlectionnerUnParcours;
	private JMenuItem mntmRechercherUnLieu;
	private JMenu mnParcours;
	private JMenuItem mntmRechercherUnParcours;
	private JMenu mnNewMenu_1;
	private JMenu mnNewMenu_2;
	private JPanel panelBtnEdit;
	private JButton btnModeEdit;
	private JMenu mnNewMenu_3;
	private JMenuItem mntmAbout;
	
	public JMenu getAcceuil() {
		return mnNewMenu_3;
	}
	
	public JMenuItem getConsultLieu() {
		return mntmNewMenuItem;
	}
	
	public JMenuItem getRechercheLieu() {
		return mntmRechercherUnLieu;
	}
	
	public JMenuItem getSelectParcours() {
		return mntmSlectionnerUnParcours;
	}
	
	public JMenuItem getRechercheParcours() {
		return mntmRechercherUnParcours;
	}
	
	public JMenu getConsultAllPoi() {
		return mnNewMenu_1;
	}
	
	public JButton getBtnEdit() {
		return btnModeEdit;
	}
	
	public ConsultMenu() {

	}
	
	public void initComponents(JPanel contentPane) {
		this.panelBtnBar = new JPanel();
		this.panelBtnBar.setAlignmentX(Component.LEFT_ALIGNMENT);
		this.panelBtnBar.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
		
		this.menuBar = new JMenuBar();
		this.menuBar.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
		this.panelBtnBar.add(this.menuBar);
		
		mnNewMenu_3 = new JMenu("Accueil");
		menuBar.add(mnNewMenu_3);
		
		this.mnNewMenu = new JMenu("Lieux");
		this.menuBar.add(this.mnNewMenu);
		
		this.mntmNewMenuItem = new JMenuItem("S\u00E9lectioner un lieu");
		this.mnNewMenu.add(this.mntmNewMenuItem);
		
		this.mntmRechercherUnLieu = new JMenuItem("Rechercher un lieu");
		this.mnNewMenu.add(this.mntmRechercherUnLieu);
		
		this.mnParcours = new JMenu("Parcours");
		this.menuBar.add(this.mnParcours);
		
		this.mntmSlectionnerUnParcours = new JMenuItem("S\u00E9lectionner un parcours");
		this.mnParcours.add(this.mntmSlectionnerUnParcours);
		
		this.mntmRechercherUnParcours = new JMenuItem("Rechercher un parcours");
		this.mnParcours.add(this.mntmRechercherUnParcours);
		
		this.mnNewMenu_1 = new JMenu("Consulter les POI");
		this.menuBar.add(this.mnNewMenu_1);
		
		this.mnNewMenu_2 = new JMenu("Help !");
		this.menuBar.add(this.mnNewMenu_2);
		
		mntmAbout = new JMenuItem("About");
		mntmAbout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JOptionPane.showMessageDialog(null, "MiniSIG -\nDEVELOPED BY\n~ Michael AMORICH\n~ Thomas SUBERCHICOT\n~ Corentin PACCOU\n~ Vianney PAVIOT", "Qui sommes-nous ?", JOptionPane.INFORMATION_MESSAGE);
			}
		});
		mnNewMenu_2.add(mntmAbout);
		
		this.panelBtnEdit = new JPanel();
		this.panelBtnEdit.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));
		
		this.btnModeEdit = new JButton("Mode Edition");
		this.btnModeEdit.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
		this.panelBtnEdit.add(this.btnModeEdit);
		
		contentPane.add(this.panelBtnBar);
		contentPane.add(panelBtnEdit);		
	}

}
